package edu.hawaii.duedates.library;

/**
 * This class represents a Library object consisting of its name, 
 * and an account login and password.
 * 
 * @author Ronn Reeves
 */
public class Library implements ILibrary {
  /** Unique identifier for this instance. */
  private static final long serialVersionUID = 1L;
  
  /** The location of the library class. */
  private String location;

  /** The unique ID for this library. */
  private int id;
  
  /** The account login for this library. */
  private String login;
  
  /** The name of this library. */
  private String name;
  
  /** The account password for this library. */
  private String password;

  /** Selected by user flag. */
  private Boolean selected = Boolean.FALSE;

  /**
   * Returns the selected value of this library.
   * 
   * @param library The library.
   * @return True if selected; false otherwise.
   */
  public Boolean getSelected(Library library) {
    return library.selected;
  }

  /**
   * Sets the selected value of this library.
   * 
   * @param selected True if selected; false otherwise.
   */
  public void setSelected(Boolean selected) {
    this.selected = selected;
  }
  
  /**
   * Gets the value of the login property.
   * 
   * @return The login.
   */
  public String getLogin() {
    return login;
  }

  
  /**
   * Gets the value of the name property.
   * 
   * @return The name of this library.
   */
  public String getName() {
    return name;
  }

  /**
   * Gets the value of the password property.
   * 
   * @return The password.
   */
  public String getPassword() {
    return password;
  }

  /**
   * Sets the value of the login property.
   * 
   * @param value The login.
   */
  public void setLogin(String value) {
    this.login = value;
  }

  /**
   * Sets the value of the name property.
   * 
   * @param value The name of this library.
   */
  public void setName(String value) {
    this.name = value;
  }

  /**
   * Sets the value of the password property.
   * 
   * @param value The password.
   */
  public void setPassword(String value) {
    this.password = value;
  }

  
  /**
   * Sets the unique ID of this library.
   * 
   * @param id The unique id.
   */
  public void setUniqueId(int id) {
   this.id = id; 
  }
  
  /**
   * Gets the unique ID of this library.
   * 
   * @return The unique id.
   */
  public int getUniqueId() {
   return this.id; 
  }


  /**
   * Sets the value of the location property.
   * @param location the location to set
   */
  public void setLocation(String location) {
    this.location = location;
  }

  /**
   * Gets the value of the location property.
   * @return the location
   */
  public String getLocation() {
    return location;
  }
}